create or replace function posTerminalConnectionType2Xml(bigint, text)
returns xml as
$$
declare
	posTerminalConnectionTypeId alias for $1;
	posTerminalConnectionTypeName alias for $2;
begin
	return
		xmlelement(
			name posterminalconnectiontype, xmlattributes(posTerminalConnectionTypeId as id), xmlelement(name posterminalconnectiontypename, posTerminalConnectionTypeName)
			)
	;
end;
$$ language plpgsql immutable; --same result for same data